package com.moon.common.criteria;

import java.util.HashMap;
import java.util.List;

public class Criteria {
	
    private List<Expression> expressions;
    private HashMap<String,Object> params;
    private String ql;
    
	public List<Expression> getExpressions() {
		return expressions;
	}
	
	public void setExpressions(List<Expression> expressions) {
		this.expressions = expressions;
	}
	
	public HashMap<String, Object> getParams() throws SecurityException, NoSuchFieldException {
		for(Expression exp:expressions){
			params.put(exp.getFieldName(), exp.getValue());
		}
		return params;
	}

	public String getQl() {
		return ql;
	}
    
}
